<?php

namespace Acme\FirmsBundle\Entity;

use Doctrine\ORM\Mapping as ORM;
use Doctrine\Common\Collections\ArrayCollection;
/**
 * Acme\FirmsBundle\Entity\Firms
 *
 * @ORM\Table(name="firms")
 * @ORM\Entity
 */
class Firms
{
    /**
     * @var integer $id
     *
     * @ORM\Column(name="id", type="integer", nullable=false)
     * @ORM\Id
     * @ORM\GeneratedValue(strategy="IDENTITY")
     */
    private $id;

    /**
     * @var string $name
     *
     * @ORM\Column(name="name", type="string", length=50, nullable=false)
     */
    private $name;

    /**
     * @var text $description
     *
     * @ORM\Column(name="description", type="text", nullable=false)
     */
    private $description;

    /**
     * @var CategoryFirms
     *
     * @ORM\ManyToOne(targetEntity="CategoryFirms")
     * @ORM\JoinColumns({
     *   @ORM\JoinColumn(name="category_id", referencedColumnName="id")
     * })
     */
    private $category;
    
    /**
     * @var UserFirms
     *
     * @ORM\OneToOne(targetEntity="Acme\FirmUsersBundle\Entity\User")
     * @ORM\JoinColumns({
     *   @ORM\JoinColumn(name="user_id", referencedColumnName="id")
     * })
     */
    private $user;
     
    /**
     * @var Staff
     * @ORM\OneToMany(targetEntity="Acme\StaffBundle\Entity\Staff", mappedBy="firm")
     * 
     */
    private $staffs;
    
    public function __construct() {
        $this->staffs = new ArrayCollection();
    }

    /**
     * Get id
     *
     * @return integer 
     */
    public function getId()
    {
        return $this->id;
    }

    /**
     * Set name
     *
     * @param string $name
     */
    public function setName($name)
    {
        $this->name = $name;
    }

    /**
     * Get name
     *
     * @return string 
     */
    public function getName()
    {
        return $this->name;
    }

    /**
     * Set description
     *
     * @param text $description
     */
    public function setDescription($description)
    {
        $this->description = $description;
    }

    /**
     * Get description
     *
     * @return text 
     */
    public function getDescription()
    {
        return $this->description;
    }

    /**
     * Set category
     *
     * @param Acme\FirmsBundle\Entity\CategoryFirms $category
     */
    public function setCategory(\Acme\FirmsBundle\Entity\CategoryFirms $category)
    {
        $this->category = $category;
    }

    /**
     * Get category
     *
     * @return Acme\FirmsBundle\Entity\CategoryFirms 
     */
    public function getCategory()
    {
        return $this->category;
    }
    

    /**
     * Set user
     *
     * @param Acme\FirmUsersBundle\Entity\User $user
     */
    public function setUser(\Acme\FirmUsersBundle\Entity\User $user)
    {
        $this->user = $user;
    }

    /**
     * Get user
     *
     * @return Acme\FirmUsersBundle\Entity\User 
     */
    public function getUser()
    {
        return $this->user;
    }

    /**
     * Add staffs
     *
     * @param Acme\StaffBundle\Entity\Staff $staffs
     */
    public function addStaff(\Acme\StaffBundle\Entity\Staff $staffs)
    {
        $this->staffs[] = $staffs;
    }

    /**
     * Get staffs
     *
     * @return Doctrine\Common\Collections\Collection 
     */
    public function getStaffs()
    {
        return $this->staffs;
    }

    /**
     * Set staffs
     *
     * @param integer $staffs
     */
    public function setStaffs($staffs)
    {
        $this->staffs = $staffs;
    }
}